export default {
  namespaced: true,
  state: {
    // 页面文档可视高度(随窗口改变大小)
    documentClientHeight: 0,
    // 导航条, 布局风格, defalut(默认) / inverse(反向)
    navbarLayoutType: 'default',
    // 侧边栏, 布局皮肤, light(浅色) / dark(黑色)
    sidebarLayoutSkin: 'dark',
    // 侧边栏, 折叠状态
    sidebarFold: false,
    // 侧边栏, 菜单
    menuList: [],
    menuActiveName: '',
    // 内容, 是否需要刷新
    contentIsNeedRefresh: false,
    // 主入口标签页
    mainTabs: [],
    mainTabsActiveName: '',
    lifeindexList:[
      {
        administrationclassId: 24,
        administrationclassName: "八年级(3)班",
        className: "系鞋带",
        departmentId: 1,
        departmentName: "小学部",
        evaluationId: [1,2],
        evaluationName: ['认真情况','完成情况'],
        id: 1,
        status: 1,
        studentId: [100864,100866,100867,100868,100869],
        studentName: ["黄徽","王铮浩","王铮亮","李浩然","宋世伦"],
        yeargroupId: 4,
        yeargroupName: "2020年-2021下学期",
        createTime:'2021-05-01'
      },
      {
        administrationclassId: 24,
        administrationclassName: "八年级(3)班",
        className: "拖地",
        departmentId: 1,
        departmentName: "小学部",
        evaluationId: [1,2],
        evaluationName: ['认真情况','完成情况'],
        id: 2,
        status: 1,
        studentId: [100864,100866,100867,100869],
        studentName: ["黄徽","王铮浩","王铮亮","宋世伦"],
        yeargroupId: 4,
        yeargroupName: "2020年-2021下学期",
        createTime:'2021-5-01'
      },
      {
        administrationclassId: 24,
        administrationclassName: "八年级(3)班",
        className: "插花",
        departmentId: 1,
        departmentName: "小学部",
        evaluationId: [1,2,3],
        evaluationName: ['认真情况','完成情况','艺术感'],
        id: 3,
        status: 1,
        studentId: [100864,100866,100867,100868,100869],
        studentName: ["黄徽","王铮浩","王铮亮","李浩然","宋世伦"],
        yeargroupId: 4,
        yeargroupName: "2020年-2021下学期",
        createTime:'2021-5-01'
      }
    ],

    moralactiveList:[
      {
        administrationclassId: 24,
        administrationclassName: "八年级(3)班",
        className: "乒乓球",
        departmentId: 1,
        departmentName: "小学部",
        evaluationId: [1,2],
        evaluationName: ['认真情况','完成情况'],
        id: 1,
        status: 1,
        studentId: [100866,100868,100869],
        studentName: ["王铮浩","李浩然","宋世伦"],
        yeargroupId: 4,
        yeargroupName: "2020年-2021下学期",
        createTime:'2021-05-01'
      },
      {
        administrationclassId: 24,
        administrationclassName: "八年级(3)班",
        className: "羽毛球",
        departmentId: 1,
        departmentName: "小学部",
        evaluationId: [1,2],
        evaluationName: ['认真情况','完成情况'],
        id: 2,
        status: 1,
        studentId: [100864,100869],
        studentName: ["黄徽","宋世伦"],
        yeargroupId: 4,
        yeargroupName: "2020年-2021下学期",
        createTime:'2021-5-01'
      },
      {
        administrationclassId: 24,
        administrationclassName: "八年级(3)班",
        className: "羽毛球双打",
        departmentId: 1,
        departmentName: "小学部",
        evaluationId: [1,2,3],
        evaluationName: ['认真情况','完成情况','团队意识'],
        id: 3,
        status: 1,
        studentId: [100866,100867,100868,100869],
        studentName: ["王铮浩","王铮亮","李浩然","宋世伦"],
        yeargroupId: 4,
        yeargroupName: "2020年-2021下学期",
        createTime:'2021-5-01'
      }
    ],
    expertiseList:[
      {
        administrationclassId: 24,
        administrationclassName: "八年级(3)班",
        className: "唱歌",
        departmentId: 1,
        departmentName: "小学部",
        evaluationId: [1,2,3],
        evaluationName: ['天赋程度','努力程度','喜爱程度'],
        id: 1,
        status: 1,
        studentId: [100864,100867,100868,100869],
        studentName: ["黄徽","王铮亮","李浩然","宋世伦"],
        yeargroupId: 4,
        yeargroupName: "2020年-2021下学期",
        createTime:'2021-05-01'
      },
      {
        administrationclassId: 24,
        administrationclassName: "八年级(3)班",
        className: "跳舞",
        departmentId: 1,
        departmentName: "小学部",
        evaluationId: [1,2,3],
        evaluationName: ['天赋程度','努力程度','喜爱程度'],
        id: 2,
        status: 1,
        studentId: [100867,100869],
        studentName: ["王铮亮","宋世伦"],
        yeargroupId: 4,
        yeargroupName: "2020年-2021下学期",
        createTime:'2021-5-01'
      },
      {
        administrationclassId: 24,
        administrationclassName: "八年级(3)班",
        className: "钢琴",
        departmentId: 1,
        departmentName: "小学部",
        evaluationId: [1,2,3],
        evaluationName: ['天赋程度','努力程度','喜爱程度'],
        id: 3,
        status: 1,
        studentId: [100866,100867,100868,100869],
        studentName: ["王铮浩","王铮亮","李浩然","宋世伦"],
        yeargroupId: 4,
        yeargroupName: "2020年-2021下学期",
        createTime:'2021-5-01'
      }
    ],
  },
  mutations: {
    updateDocumentClientHeight (state, height) {
      state.documentClientHeight = height
    },
    updateNavbarLayoutType (state, type) {
      state.navbarLayoutType = type
    },
    updateSidebarLayoutSkin (state, skin) {
      state.sidebarLayoutSkin = skin
    },
    updateSidebarFold (state, fold) {
      state.sidebarFold = fold
    },
    updateMenuList (state, list) {
      state.menuList = list
    },
    updateMenuActiveName (state, name) {
      state.menuActiveName = name
    },
    updateContentIsNeedRefresh (state, status) {
      state.contentIsNeedRefresh = status
    },
    updateMainTabs (state, tabs) {
      state.mainTabs = tabs
    },
    updateMainTabsActiveName (state, name) {
      state.mainTabsActiveName = name
    },
    updateLifeindexList(state,list){
      console.log(list)
      list.id = list.id ? list.id : state.lifeindexList.length + 1
      list.id ? state.lifeindexList[list.id-1] = list : state.lifeindexList.push(list)
    },
    deleteLifeindexList(state,id){
      state.lifeindexList.splice(id-1,1)
    },
    updateMoralactiveList(state,list){
      console.log(list)
      list.id = list.id ? list.id : state.moralactiveList.length + 1
      list.id ? state.moralactiveList[list.id-1] = list : state.moralactiveList.push(list)
    },
    deleteMoralactiveList(state,id){
      state.moralactiveList.splice(id-1,1)
    },
    updateExpertiseList(state,list){
      console.log(list)
      list.id = list.id ? list.id : state.expertiseList.length + 1
      list.id ? state.expertiseList[list.id-1] = list : state.expertiseList.push(list)
    },
    deleteExpertiseList(state,id){
      state.expertiseList.splice(id-1,1)
    }
  }
}
